package demo1.bit.com;
class B {
    public B() {
        fun();
    }
    public void fun() {
        System.out.println("B.fun");
    }
}
class D extends B {
    private int num = 1;
    public D() {
        super();
    }
    @Override
    public void fun() {
        System.out.println("D.fun  " + num);  //  D.fun  0  因为num没有被初始化所以是0
    }
}
public class Test1 {
    public static void main(String[] args) {
        D d = new D();
    }
}
